package m.member.order.model;

import m.common.model.FieldMeta;
import m.common.model.LinkTableMeta;
import m.common.model.Model;
import m.common.model.TableMeta;
import m.common.model.type.FieldType;
import m.member.manage.model.MemberInfo;
import manage.model.AdminLogin;
import manage.model.OrgGroupView;

import java.util.Date;

@TableMeta(name="to_member_recharge",description="会员充值表")
public class MemberRecharge extends Model {
    @LinkTableMeta(name="member_oid",table= MemberInfo.class,description="会员信息")
    private MemberInfo member;
    @LinkTableMeta(name="order_oid",table= OrderInfo.class,description="赊账订单")
    private OrderInfo order;

    @FieldMeta(name="type",type= FieldType.STRING,description="付款类型",dictOption = "A:支付宝,B:微信,C:银联,D:现金")
    private String type;
    @FieldMeta(name = "pay_amount",type = FieldType.DOUBLE,defaultValue = "0",description = "付款金额|正数")
    private Double payAmount;
    @FieldMeta(name = "give_amount",type = FieldType.DOUBLE,defaultValue = "0",description = "赠送金额|正数")
    private Double giveAmount;
    @FieldMeta(name = "surplus_pay_amount",type = FieldType.DOUBLE,defaultValue = "0",description = "剩余付款金额-已抵消的金额")
    private Double surplusPayAmount;
    @FieldMeta(name = "surplus_give_amount",type = FieldType.DOUBLE,defaultValue = "0",description = "剩余赠送金额-已抵消的金额")
    private Double surplusGiveAmount;
    @FieldMeta(name = "give_point",type = FieldType.INT,defaultValue = "0",description = "赠送积分")
    private Integer givePoint;

    @FieldMeta(name="remark",type= FieldType.STRING,length=500,description="备注")
    private String remark;

    @FieldMeta(name="input_date",type=FieldType.DATE,defaultValue = "CURRENT_TIMESTAMP",description="录入时间")
    private Date inputDate;
    @LinkTableMeta(name="serve_admin_oid",table= AdminLogin.class,description="服务员")
    private AdminLogin serveAdmin;
    @LinkTableMeta(name="input_admin_oid",table= AdminLogin.class,description="录入人")
    private AdminLogin inputAdmin;
    @LinkTableMeta(name="input_dept_oid",table= OrgGroupView.class,description="录入部门")
    private OrgGroupView inputDept;
    @FieldMeta(name="status",type= FieldType.STRING,description="状态",defaultValue = "N",dictOption = "Y:已确认,N:待确认")
    private String status;
    @LinkTableMeta(name="confirm_admin_oid",table= AdminLogin.class,description="确认人")
    private AdminLogin confirmAdmin;
    @FieldMeta(name="confirm_date",type=FieldType.DATE,description="确认时间")
    private Date confirmDate;

    public OrderInfo getOrder() {
        return order;
    }

    public void setOrder(OrderInfo order) {
        this.order = order;
    }

    public AdminLogin getServeAdmin() {
        return serveAdmin;
    }

    public void setServeAdmin(AdminLogin serveAdmin) {
        this.serveAdmin = serveAdmin;
    }

    public Double getSurplusPayAmount() {
        return surplusPayAmount;
    }

    public void setSurplusPayAmount(Double surplusPayAmount) {
        this.surplusPayAmount = surplusPayAmount;
    }

    public Double getSurplusGiveAmount() {
        return surplusGiveAmount;
    }

    public void setSurplusGiveAmount(Double surplusGiveAmount) {
        this.surplusGiveAmount = surplusGiveAmount;
    }

    public OrgGroupView getInputDept() {
        return inputDept;
    }

    public void setInputDept(OrgGroupView inputDept) {
        this.inputDept = inputDept;
    }

    public MemberInfo getMember() {
        return member;
    }

    public void setMember(MemberInfo member) {
        this.member = member;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Double getPayAmount() {
        return payAmount;
    }

    public void setPayAmount(Double payAmount) {
        this.payAmount = payAmount;
    }

    public Double getGiveAmount() {
        return giveAmount;
    }

    public void setGiveAmount(Double giveAmount) {
        this.giveAmount = giveAmount;
    }

    public Integer getGivePoint() {
        return givePoint;
    }

    public void setGivePoint(Integer givePoint) {
        this.givePoint = givePoint;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Date getInputDate() {
        return inputDate;
    }

    public void setInputDate(Date inputDate) {
        this.inputDate = inputDate;
    }

    public AdminLogin getInputAdmin() {
        return inputAdmin;
    }

    public void setInputAdmin(AdminLogin inputAdmin) {
        this.inputAdmin = inputAdmin;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public AdminLogin getConfirmAdmin() {
        return confirmAdmin;
    }

    public void setConfirmAdmin(AdminLogin confirmAdmin) {
        this.confirmAdmin = confirmAdmin;
    }

    public Date getConfirmDate() {
        return confirmDate;
    }

    public void setConfirmDate(Date confirmDate) {
        this.confirmDate = confirmDate;
    }
}
